import request from '@/utils/request'
import { getRefreshToken } from '@/utils/auth'
import common from '@/assets/js/common.js'
import service from '@/utils/request'

// 获得角色分页
// export function listUser(params) {
//     return request({
//       url: common.base64DeCode('97BE4A8FF1E879A83A56EA07A4CAE6A267CC8BEEE5DBC31219F2C8A8831BE73D'), //  /system/user/list-all-simple
//       method: 'get',
//       params
//     })
// }
export function listUser(data) {
  return request({
    url: common.base64DeCode('97BE4A8FF1E879A83A56EA07A4CAE6A2BB24E4CB463733CD8461549827B31707'), //  /system/user/list-all-on
    method: 'post',
    data
  })
}
//批量上传用户
export function importUser() {
  return process.env.VUE_APP_BASE_API + '/admin-api' +common.base64DeCode('274C480E14DD2F1414D95D96EDED7AE72362ACC666D051A0C05661ABEDB16C29')// /system/user/importUser
}
//用户组织批量结果上传
export function importResult(fileKey) {
  return request({
    url: (common.base64DeCode('274C480E14DD2F1414D95D96EDED7AE7F0A6E11E6FA9BE299B75A8FBB175E1CE')) +'/'+fileKey, //  /system/user/importResult
    method: 'get',
  })
}
export function importOrg() {
  return process.env.VUE_APP_BASE_API + '/admin-api' +common.base64DeCode('3A659F231F07F3FEA9C176908F862907E2BD43A2A758C7E309159D3249901889')// /system/dept/importOrg
}

export function updateUserProfilePassword(data) {
  return request({
    url: common.base64DeCode('7B0D96BBDDF8276757CAEA5AC3D3EACCEEBFC0FC631217C05C9A0FE372555495DF3618BDFEF3ABC04D9A8410A0AC21A6'), //  /system/user/profile/update-password
    method: 'post',
    data:data
  })
}
//批量导入组织
export function updateImportOrg(data) {
  return request({
    url: common.base64DeCode('3A659F231F07F3FEA9C176908F862907E2BD43A2A758C7E309159D3249901889'), //  /system/dept/importOrg
    method: 'post',
    data
  })
}

export function updateRoleStatus(data) {
  return request({
    url: common.base64DeCode('0291A5077FFB370176D087AA84FC945D1B01A1E020DEB71A0D9338DA2B402FCF'), //  /system/role/update-status
    method: 'post',
    data
  })
}

export function updateRole(data) {
  return request({
    url: common.base64DeCode('0291A5077FFB370176D087AA84FC945D738E086FA647FCAD246E34051147DB64'), //  /system/role/update
    method: 'post',
    data
  })
}
//删除
export function delRole(params) {
  return request({
    url: common.base64DeCode('5293359B1BB00051D2ED2D6D8E974C7972A6086A5FD6444D2627689719A61A75'), //  /system/role/delete
    method: 'get',
    params
  })
}
//获得角色信息
export function getRole(params) {
  return request({
    url: common.base64DeCode('EDDB80F6815179A999A9F9343C8B40FE13FA7CB244EFDD78189ED4B991CC2E38'), //  /system/role/get
    method: 'get',
    params
  })
}

//获取角色详细配置信息

export function roleConfig(params) {
  return request({
    url: common.base64DeCode('E1071D6D944EDAA3712903DF61BCEFDBDBB9765C05B6DCB9138C3B3E452026FF'), //  /system/permission/role-config
    method: 'get',
    params
  })
}
